﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<div class="promotion">
 <%List<Promotion> list = (List<Promotion>)ViewData["MasterPromotion"];
          int y = 0;
          for (int i = 0; i < list.Count; i += 4)
          {%>
         <table width="100%" border="0" cellspacing="2" cellpadding="2">
            <%for (int z = 0; z < 4; z++)
              {
                  if (y < list.Count)
                  {
                      Promotion obj = list[y]; %>
                      <tr>
                        <td>
                             <a style="font-weight:bold" href="<%=FRouter._("khuyenmai", obj.ID.ToString(), obj.Title) %>"><img src="<%=Constants.PHOTO_PATH_ROOT_PARTNER + (!string.IsNullOrEmpty(obj.Image)?obj.Image:"NoImage.jpg") %>" width="248"
                    height="99" style="border:2px solid #CCCCCC" /></a>
                        </td>
                      </tr>
                       <%y++;
                  }
              }%>
         </table>
        <%  }
            
        %>
        </div>
<script type="text/javascript">
    $(document).ready(function () {
        $('.promotion').cycle({
            delay: 4000,
            pause: 1
        });
    });
</script>
